<?php $this->_extends('_layouts/user_layout'); ?>

<?php $this->_block('pageCss'); ?>
	<link rel="stylesheet" type="text/css" href="<?php echo $css_url; ?>user.css" />
<?php $this->_endblock(); ?>

<?php $this->_block('pageJs'); ?>
<?php $this->_endblock(); ?>



<?php $this->_block('title'); ?>
	登录 - 图乐网
<?php $this->_endblock(); ?>



		
<?php $this->_block('contents'); ?>
<section class="content">
	<section class="central">
		<hgroup>
			<h1>登录</h1>
			<h2>
				还没有账号？点击这里<a href="<?php echo url('user/register'); ?>">30秒注册</a><br />
				还可以选择右边的多种方式便捷登录，尽享互联乐趣
			</h2>
		</hgroup>
		
		<section class="container-box">
			<section class="content">
				<ul class="formErrors">
					<?php $formErrors = $userModel->getValidateError(); if(!empty($formErrors)): ?>
						<?php foreach($formErrors as $item => $errors): ?>
							<li>
								<?php echo $item; ?>
								<ul>
									<?php foreach($errors as $error): ?>
										<li class="error"><?php echo $error; ?></li>
									<?php endforeach; ?>
								</ul>
							</li>
						<?php endforeach; ?>
					<?php endif; ?>
				</ul>
			
				<form name="loginForm" id="loginForm" method="POST">
					<label for="email">电子邮箱</label>
					<div class="input-group">
						<input type="text" name="loginForm[email]" id="email">
                    </div>
	
					<label for="password">密码</label>
					<div class="input-group">
						<input type="password" name="loginForm[password]" id="password">
                    </div>
                    
                    <?php if($showCheckCode): ?>
	                    <section class="half fleft">
							<label for="email">请输入验证码</label>
							<div class="input-group">
								<input type="text" name="loginForm[checkCode]" id="checkCode">
		                    </div>
	                    </section>
	                    <section class="half fleft">
	                    	<label for="email"><a id="reimg">看不清</a></label>
	                    	<div class="input-group">
								<img id="checkcode_img" height="42" src="<?php echo url('user/accesscode'); ?>">
							</div>
							<script>
								$('#reimg').click(function(){
									$('#checkcode_img').attr('src', '<?php echo url('user/accesscode'); ?>?r='+Math.random(0,99999));
								});
							</script>
	                    </section>
	                    <div class="clear"></div>
                    <?php endif; ?>
                    
					<section id="submit-sign-up">
						<input type="submit" class="button ff_sf_cr_op_text-shadow-green ff_sf_cr_op_border-radius2" value="登录">
					</section>
				</form>
				<?php $this->_element('formvalueinitscript', array('formSelector' => '#loginForm', 'formData' => $userModel->attributes)); ?>
			</section>
	
			<aside id="sidebar">
				<blockquote class="fleft">
					<a href="#">QQ登录</a><br>
					百度账号登录<br />
					新浪微博帐号<br />
					人人网帐号<br />
					支付宝帐号<br />
					开心网帐号<br />
					<span class="source fleft">&mdash; 合作账号一键登录图乐网</span>
				</blockquote>
			</aside>
		</section>
	</section>
</section>
<?php $this->_endblock('contents'); ?>















